/*--------------------------------------------------------------------------*/
/*--------------------------------------------------------------------------*/
// pbdecbtn.hpp - PegBmpDecoratedButton. Derived button that supports both
//               text and a bitmap on top of a bitmap background.
//
// Author: Jarret M. Gill
//
// Copyright (c) 1997-2009 Swell Software
//              All Rights Reserved.
//
// Unauthorized redistribution of this source code, in whole or part,
// without the express written permission of Swell Software
// is strictly prohibited.
//
// Notes:
//
/*--------------------------------------------------------------------------*/
/*--------------------------------------------------------------------------*/

#ifndef _PEGBDECBUTTON_
#define _PEGBDECBUTTON_

/*--------------------------------------------------------------------------*/
// PegBitmapButton Bitmap Indexes
/*--------------------------------------------------------------------------*/
enum PBMI_BMDECBTN_BMPS {
    PBMI_BMP_NORMAL = 0,      // Default bitmap
    PBMI_BMP_PRESSED,         // Pressed bitmap
    PBMI_BMP_FOCUS,           // Has focus
    PBMI_BMP_DISABLED,        // Disabled
    PBMI_BMP_ICON             // Icon
};


/*--------------------------------------------------------------------------*/
/*--------------------------------------------------------------------------*/
class PegBmpDecoratedButton : public PegBitmapButton
{
    public:
        PegBmpDecoratedButton(const PegRect &Size, PEGUINT NormalBmp,
            PEGUINT PressedBmp, PEGUINT FocusedBmp = 0, PEGUINT IconId = 0,
            PEGUINT StringId = 0, PEGUSHORT Id = 0,
            PEGULONG Style = AF_ENABLED|FF_NONE|BF_BMHCENTER|BF_BMVCENTER
              #ifdef PEG_BTN_FLYOVER
                | BF_FLYOVER
              #endif
            );

        PegBmpDecoratedButton(const PEGCHAR *pText, const PegRect &Size,
            PEGUINT NormalBmp, PEGUINT PressedBmp, PEGUINT FocusedBmp = 0,
            PEGUINT IconId = 0, PEGUSHORT Id = 0,
            PEGULONG Style = TT_COPY|AF_ENABLED|FF_NONE|BF_BMHCENTER|BF_BMVCENTER
              #ifdef PEG_BTN_FLYOVER
                | BF_FLYOVER
              #endif
            );

        virtual void Draw(const PegRect &Invalid);
        virtual void SetBitmap(PEGUINT Index, PEGUINT BitmapId);
        virtual PEGUINT GetBitmap(PEGUINT Index);
        virtual void SetIcon(PEGUINT IconId) { mIconId = IconId; }
        virtual PEGUINT GetIcon(void) { return mIconId; }

    protected:
        PEGUINT mIconId;
};




#endif




